#pragma once

#include "fwDefine.h"
#include "..\fwStringHelper.h"

#define POSITION_STRING		"pos:[%f,%f,%f] "
#define COORDINATE_STRING	"uv:[%f,%f] "
#define NORMAL_STRING		"nrm:[%f,%f,%f] "
#define BINORMAL_STRING		"bnrm:[%f,%f,%f] "
#define TANGENT_STRING		"tgt:[%f,%f,%f]\n"
#define NUM_STRING			"NUM: %d\n"
#define INDEX_STRING		"%d %d %d\n"

class ModelTextHelper
{
public:
	Vector2 ReadVector2(FILE*, const char* format);
	Vector3 ReadVector3(FILE*, const char* format);
	Vector4 ReadVector4(FILE*, const char* format);

	void WriteVector2(FILE*, const char* format, Vector2);
	void WriteVector3(FILE*, const char* format, Vector3);
	void WriteVector4(FILE*, const char* format, Vector4);

	Vertex* ReadVertices(FILE*, const FWuint count);
	FWuint* ReadIndices(FILE*, const FWuint count);

	void WriteVertices(FILE*, const FWuint count, Vertex*);
	void WriteIndices(FILE*, const FWuint count, FWuint*);
};